package org.kumas.sgrpc.remoting;

import java.net.InetSocketAddress;

import org.kumas.sgrpc.common.URL;

/**
 * @author KumasZhang
 * @version 1.0
 * @since 2021-07-13 08:19
 */
public interface Endpoint {
    URL getUrl();
    ChannelHandler getChannelHandler();
    InetSocketAddress getLocalAddress();
    void send(Object message) throws RemotingException;
    void send(Object message, boolean sent) throws RemotingException;
    void close();
    void close(int timeout);

    void startClose();
    boolean isClosed();
}
